[FORMAT "WCOFF"]
[INSTRSET "i486p"]
[OPTIMIZE 1]
[OPTION 1]
[BITS 32]
	EXTERN	_boxfill8
	EXTERN	_putfonts8_asc
	EXTERN	_task_now
	EXTERN	_sheet_refresh
[FILE "window.c"]
[SECTION .text]
	GLOBAL	_make_window8
_make_window8:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,24
	MOV	EAX,DWORD [16+EBP]
	MOV	EBX,DWORD [12+EBP]
	MOV	DWORD [-16+EBP],EAX
	MOV	ESI,DWORD [8+EBP]
	MOV	EAX,DWORD [20+EBP]
	MOV	DWORD [-20+EBP],EAX
	MOVSX	EAX,BYTE [24+EBP]
	MOV	DWORD [-24+EBP],EAX
	LEA	EAX,DWORD [-1+EBX]
	PUSH	0
	MOV	DWORD [-28+EBP],EAX
	PUSH	EAX
	PUSH	0
	PUSH	0
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	PUSH	0
	PUSH	DWORD [-28+EBP]
	PUSH	0
	PUSH	0
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	LEA	EAX,DWORD [-2+EBX]
	ADD	ESP,56
	PUSH	1
	MOV	DWORD [-32+EBP],EAX
	PUSH	EAX
	PUSH	1
	PUSH	1
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	MOV	EAX,DWORD [-16+EBP]
	DEC	EAX
	MOV	DWORD [-36+EBP],EAX
	PUSH	EAX
	PUSH	0
	PUSH	0
	PUSH	0
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	MOV	EDI,DWORD [-16+EBP]
	ADD	ESP,56
	SUB	EDI,2
	PUSH	EDI
	PUSH	1
	PUSH	1
	PUSH	1
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	PUSH	EDI
	PUSH	DWORD [-32+EBP]
	PUSH	1
	PUSH	DWORD [-32+EBP]
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	ADD	ESP,56
	PUSH	DWORD [-36+EBP]
	PUSH	DWORD [-28+EBP]
	PUSH	0
	PUSH	DWORD [-28+EBP]
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	MOV	EAX,DWORD [-16+EBP]
	SUB	EAX,3
	PUSH	EAX
	LEA	EAX,DWORD [-3+EBX]
	PUSH	EAX
	PUSH	2
	PUSH	2
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	LEA	EAX,DWORD [-4+EBX]
	ADD	ESP,56
	PUSH	20
	PUSH	EAX
	PUSH	3
	PUSH	3
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	PUSH	EDI
	PUSH	DWORD [-32+EBP]
	PUSH	EDI
	PUSH	1
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	ADD	ESP,56
	PUSH	DWORD [-36+EBP]
	PUSH	DWORD [-28+EBP]
	PUSH	DWORD [-36+EBP]
	PUSH	0
	PUSH	16777215
	PUSH	EBX
	PUSH	ESI
	CALL	_boxfill8
	MOV	DWORD [8+EBP],ESI
	MOV	EAX,DWORD [-24+EBP]
	MOV	DWORD [12+EBP],EBX
	MOV	DWORD [20+EBP],EAX
	ADD	ESP,28
	MOV	EAX,DWORD [-20+EBP]
	MOV	DWORD [16+EBP],EAX
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_make_wtitle8
[SECTION .data]
_closebtn.0:
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQ@QQQQ@QQQQQ"
	DB	"QQQQQQ@QQ@QQQQQQ"
	DB	"QQQQQQQ@@QQQQQQQ"
	DB	"QQQQQQQ@@QQQQQQQ"
	DB	"QQQQQQ@QQ@QQQQQQ"
	DB	"QQQQQ@QQQQ@QQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
	DB	"QQQQQQQQQQQQQQQQ"
[SECTION .text]
	GLOBAL	_make_wtitle8
_make_wtitle8:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	PUSH	EAX
	MOV	EDI,DWORD [12+EBP]
	CMP	BYTE [20+EBP],0
	JE	L3
	MOV	EBX,16777215
	MOV	EDX,132
L4:
	PUSH	20
	LEA	EAX,DWORD [-4+EDI]
	PUSH	EAX
	XOR	ESI,ESI
	PUSH	3
	PUSH	3
	PUSH	EDX
	PUSH	EDI
	PUSH	DWORD [8+EBP]
	CALL	_boxfill8
	PUSH	DWORD [16+EBP]
	PUSH	EBX
	PUSH	4
	PUSH	24
	PUSH	EDI
	PUSH	DWORD [8+EBP]
	CALL	_putfonts8_asc
	ADD	ESP,52
	IMUL	ECX,EDI,5
	MOV	DWORD [-16+EBP],0
L20:
	LEA	EDX,DWORD [ECX+EDI*1]
	MOV	EAX,DWORD [8+EBP]
	XOR	EBX,EBX
	LEA	EDX,DWORD [-84+EAX+EDX*4]
L19:
	MOVSX	EAX,BYTE [_closebtn.0+EBX+ESI*1]
	CMP	EAX,64
	JE	L25
	CMP	EAX,36
	JE	L26
	CMP	EAX,81
	JE	L27
	MOV	EAX,13027014
L14:
	INC	EBX
	MOV	DWORD [EDX],EAX
	ADD	EDX,4
	CMP	EBX,15
	JLE	L19
	INC	DWORD [-16+EBP]
	ADD	ECX,EDI
	ADD	ESI,16
	CMP	DWORD [-16+EBP],13
	JLE	L20
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L27:
	MOV	EAX,16777215
	JMP	L14
L26:
	MOV	EAX,8684676
	JMP	L14
L25:
	XOR	EAX,EAX
	JMP	L14
L3:
	MOV	EBX,13027014
	MOV	EDX,8684676
	JMP	L4
	GLOBAL	_putfonts8_asc_sht
_putfonts8_asc_sht:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,24
	MOV	EAX,DWORD [20+EBP]
	MOV	EDX,DWORD [24+EBP]
	MOV	DWORD [-16+EBP],EAX
	MOV	DWORD [-20+EBP],EDX
	MOV	EAX,DWORD [28+EBP]
	MOV	EDX,DWORD [32+EBP]
	MOV	DWORD [-28+EBP],EDX
	MOV	DWORD [-24+EBP],EAX
	MOV	EDI,DWORD [8+EBP]
	MOV	EBX,DWORD [12+EBP]
	MOV	ESI,DWORD [16+EBP]
	CALL	_task_now
	MOV	DWORD [-32+EBP],EAX
	LEA	EAX,DWORD [15+ESI]
	PUSH	EAX
	MOV	EAX,DWORD [-28+EBP]
	LEA	EAX,DWORD [EBX+EAX*8]
	MOV	DWORD [-36+EBP],EAX
	DEC	EAX
	PUSH	EAX
	PUSH	ESI
	PUSH	EBX
	PUSH	DWORD [-20+EBP]
	PUSH	DWORD [4+EDI]
	PUSH	DWORD [EDI]
	CALL	_boxfill8
	MOV	EDX,DWORD [-32+EBP]
	ADD	ESP,28
	CMP	BYTE [188+EDX],0
	JE	L29
	CMP	BYTE [189+EDX],0
	JNE	L32
L29:
	PUSH	DWORD [-24+EBP]
	PUSH	DWORD [-16+EBP]
	PUSH	ESI
	PUSH	EBX
	PUSH	DWORD [4+EDI]
	PUSH	DWORD [EDI]
	CALL	_putfonts8_asc
	MOV	DWORD [12+EBP],EBX
	MOV	EDX,DWORD [-28+EBP]
	LEA	EAX,DWORD [16+ESI]
	MOV	DWORD [24+EBP],EAX
	ADD	ESP,24
	LEA	EAX,DWORD [EBX+EDX*8]
	MOV	DWORD [16+EBP],ESI
	MOV	DWORD [20+EBP],EAX
L31:
	MOV	DWORD [8+EBP],EDI
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	JMP	_sheet_refresh
L32:
	PUSH	DWORD [-24+EBP]
	PUSH	DWORD [-16+EBP]
	PUSH	ESI
	PUSH	EBX
	PUSH	DWORD [4+EDI]
	PUSH	DWORD [EDI]
	CALL	_putfonts8_asc
	MOV	DWORD [16+EBP],ESI
	LEA	EAX,DWORD [16+ESI]
	ADD	ESP,24
	MOV	DWORD [24+EBP],EAX
	MOV	EAX,DWORD [-36+EBP]
	MOV	DWORD [20+EBP],EAX
	LEA	EAX,DWORD [-8+EBX]
	MOV	DWORD [12+EBP],EAX
	JMP	L31
	GLOBAL	_make_textbox8
_make_textbox8:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,20
	MOV	EAX,DWORD [12+EBP]
	MOV	ESI,DWORD [16+EBP]
	ADD	EAX,DWORD [20+EBP]
	SUB	ESI,3
	PUSH	ESI
	MOV	DWORD [-16+EBP],EAX
	MOV	EAX,DWORD [16+EBP]
	ADD	EAX,DWORD [24+EBP]
	MOV	DWORD [-20+EBP],EAX
	MOV	EAX,DWORD [-16+EBP]
	INC	EAX
	PUSH	EAX
	MOV	DWORD [-24+EBP],EAX
	MOV	EAX,DWORD [12+EBP]
	PUSH	ESI
	SUB	EAX,2
	PUSH	EAX
	MOV	DWORD [-28+EBP],EAX
	MOV	EAX,DWORD [8+EBP]
	PUSH	8684676
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EDI,DWORD [12+EBP]
	MOV	EAX,DWORD [-20+EBP]
	SUB	EDI,3
	INC	EAX
	PUSH	EAX
	MOV	DWORD [-32+EBP],EAX
	PUSH	EDI
	MOV	EAX,DWORD [8+EBP]
	PUSH	ESI
	PUSH	EDI
	PUSH	8684676
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [8+EBP]
	ADD	ESP,56
	MOV	EBX,DWORD [-20+EBP]
	ADD	EBX,2
	PUSH	EBX
	PUSH	DWORD [-24+EBP]
	PUSH	EBX
	PUSH	EDI
	PUSH	16777215
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [-16+EBP]
	PUSH	EBX
	ADD	EAX,2
	PUSH	EAX
	PUSH	ESI
	PUSH	EAX
	MOV	EAX,DWORD [8+EBP]
	PUSH	16777215
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [8+EBP]
	ADD	ESP,56
	MOV	EBX,DWORD [16+EBP]
	SUB	EBX,2
	MOV	EDI,DWORD [12+EBP]
	PUSH	EBX
	DEC	EDI
	PUSH	DWORD [-16+EBP]
	PUSH	EBX
	PUSH	EDI
	PUSH	0
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [8+EBP]
	PUSH	DWORD [-20+EBP]
	PUSH	DWORD [-28+EBP]
	PUSH	EBX
	PUSH	DWORD [-28+EBP]
	PUSH	0
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [8+EBP]
	ADD	ESP,56
	PUSH	DWORD [-32+EBP]
	PUSH	DWORD [-16+EBP]
	PUSH	DWORD [-32+EBP]
	PUSH	DWORD [-28+EBP]
	PUSH	13027014
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [8+EBP]
	PUSH	DWORD [-32+EBP]
	PUSH	DWORD [-24+EBP]
	PUSH	EBX
	PUSH	DWORD [-24+EBP]
	PUSH	13027014
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	MOV	EAX,DWORD [16+EBP]
	ADD	ESP,56
	DEC	EAX
	PUSH	DWORD [-20+EBP]
	PUSH	DWORD [-16+EBP]
	PUSH	EAX
	MOV	EAX,DWORD [8+EBP]
	PUSH	EDI
	PUSH	DWORD [28+EBP]
	PUSH	DWORD [4+EAX]
	PUSH	DWORD [EAX]
	CALL	_boxfill8
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
	GLOBAL	_change_wtitle8
_change_wtitle8:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	SUB	ESP,32
	MOV	EAX,DWORD [8+EBP]
	CMP	BYTE [12+EBP],0
	MOV	EDX,DWORD [EAX]
	MOV	ECX,DWORD [4+EAX]
	MOV	DWORD [-40+EBP],EDX
	JE	L35
	MOV	DWORD [-24+EBP],16777215
	MOV	DWORD [-28+EBP],132
	MOV	DWORD [-32+EBP],13027014
	MOV	DWORD [-36+EBP],8684676
L36:
	IMUL	EDI,ECX,3
	MOV	DWORD [-20+EBP],17
	MOV	DWORD [-44+EBP],EDI
L49:
	MOV	DWORD [-16+EBP],3
	LEA	EAX,DWORD [-4+ECX]
	CMP	DWORD [-16+EBP],EAX
	JG	L53
	MOV	EAX,DWORD [-40+EBP]
	MOV	EDX,DWORD [-44+EBP]
	LEA	ESI,DWORD [12+EAX+EDI*4]
	LEA	EBX,DWORD [12+EAX+EDX*4]
L48:
	MOV	EDX,DWORD [EBX]
	CMP	EDX,DWORD [-32+EBP]
	JE	L54
L45:
	CMP	EDX,DWORD [-36+EBP]
	JE	L55
L46:
	INC	DWORD [-16+EBP]
	LEA	EAX,DWORD [-4+ECX]
	MOV	DWORD [ESI],EDX
	ADD	EBX,4
	ADD	ESI,4
	CMP	DWORD [-16+EBP],EAX
	JLE	L48
L53:
	ADD	EDI,ECX
	ADD	DWORD [-44+EBP],ECX
	DEC	DWORD [-20+EBP]
	JNS	L49
	PUSH	21
	PUSH	ECX
	PUSH	3
	PUSH	3
	PUSH	DWORD [8+EBP]
	CALL	_sheet_refresh
	LEA	ESP,DWORD [-12+EBP]
	POP	EBX
	POP	ESI
	POP	EDI
	POP	EBP
	RET
L55:
	MOV	EDX,DWORD [-28+EBP]
	JMP	L46
L54:
	LEA	EAX,DWORD [-22+ECX]
	CMP	DWORD [-16+EBP],EAX
	JG	L45
	MOV	EDX,DWORD [-24+EBP]
	JMP	L46
L35:
	MOV	DWORD [-24+EBP],13027014
	MOV	DWORD [-28+EBP],8684676
	MOV	DWORD [-32+EBP],16777215
	MOV	DWORD [-36+EBP],132
	JMP	L36
